package MyGO.property;

import MyGO.utils.DateTimeUtils.DateTimeUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Medicine {
    private String id;
    private String name;
    private String format;  //  规格
    private String unit; // 包装单位
    private String manufacturer;  // 生产厂家
    private Double price; //  单价
    private String priceStr;
    private String helpCode; // 拼音助记码
    private Integer number; //储量



    public Medicine(String id, String name, String format, String unit,
                    String manufacturer, Double price,
                    String helpCode, Integer number) {
        this.id = id;
        this.name = name;
        this.format = format;
        this.unit = unit;
        this.manufacturer = manufacturer;
        this.price = price;
        this.priceStr = String.valueOf(price);
        this.helpCode = helpCode;
        this.number = number;
    }
    public void deleteNumber(Integer num){
        number -= num;
    }
}
